package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * SysUserParameter generated by hbm2java
 */
@Entity
@Table(name="sys_user_parameter"
    ,catalog="ncsc_erp"
)
public class SysUserParameter  implements java.io.Serializable {


     private SysUserParameterId id;
     private SysUserAccount sysUserAccount;
     private SysParameterMaster sysParameterMaster;
     private String paramStringVal;
     private BigDecimal paramNumberVal;

    public SysUserParameter() {
    }

	
    public SysUserParameter(SysUserParameterId id, SysUserAccount sysUserAccount, SysParameterMaster sysParameterMaster) {
        this.id = id;
        this.sysUserAccount = sysUserAccount;
        this.sysParameterMaster = sysParameterMaster;
    }
    public SysUserParameter(SysUserParameterId id, SysUserAccount sysUserAccount, SysParameterMaster sysParameterMaster, String paramStringVal, BigDecimal paramNumberVal) {
       this.id = id;
       this.sysUserAccount = sysUserAccount;
       this.sysParameterMaster = sysParameterMaster;
       this.paramStringVal = paramStringVal;
       this.paramNumberVal = paramNumberVal;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="userNo", column=@Column(name="USER_NO", nullable=false) ), 
        @AttributeOverride(name="paramNo", column=@Column(name="PARAM_NO", nullable=false) ) } )
    public SysUserParameterId getId() {
        return this.id;
    }
    
    public void setId(SysUserParameterId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="USER_NO", nullable=false, insertable=false, updatable=false)
    public SysUserAccount getSysUserAccount() {
        return this.sysUserAccount;
    }
    
    public void setSysUserAccount(SysUserAccount sysUserAccount) {
        this.sysUserAccount = sysUserAccount;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="PARAM_NO", nullable=false, insertable=false, updatable=false)
    public SysParameterMaster getSysParameterMaster() {
        return this.sysParameterMaster;
    }
    
    public void setSysParameterMaster(SysParameterMaster sysParameterMaster) {
        this.sysParameterMaster = sysParameterMaster;
    }

    
    @Column(name="PARAM_STRING_VAL", length=50)
    public String getParamStringVal() {
        return this.paramStringVal;
    }
    
    public void setParamStringVal(String paramStringVal) {
        this.paramStringVal = paramStringVal;
    }

    
    @Column(name="PARAM_NUMBER_VAL", precision=15, scale=4)
    public BigDecimal getParamNumberVal() {
        return this.paramNumberVal;
    }
    
    public void setParamNumberVal(BigDecimal paramNumberVal) {
        this.paramNumberVal = paramNumberVal;
    }




}


